package utils;

import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;

public class JTripleValue extends JPanel {

	public JTripleValue (JComponent x, JComponent y, JComponent z, JComponent w) {
		setLayout(new GridLayout(4,1));
		setBorder(BorderFactory.createCompoundBorder(new EmptyBorder(10, 10, 10, 10), new EtchedBorder()));

		if (x!=null)
			add(x);
		else add(new JLabel(""));
		if (y!=null)
			add(y);
		else add(new JLabel(""));
		if (z!=null)
			add(z);
		else add(new JLabel(""));
		if (w!=null)
			add(w);
		else add(new JLabel(""));
	}

	public JTripleValue (JComponent x, JComponent y, JComponent z, JComponent w, JComponent a) {
		setLayout(new GridLayout(5,1));
		setBorder(BorderFactory.createCompoundBorder(new EmptyBorder(10, 10, 10, 10), new EtchedBorder()));

		if (x!=null)
			add(x);
		else add(new JLabel(""));
		if (y!=null)
			add(y);
		else add(new JLabel(""));
		if (z!=null)
			add(z);
		else add(new JLabel(""));
		if (w!=null)
			add(w);
		else add(new JLabel(""));
		if (a!=null)
			add(a);
		else add(new JLabel(""));
	}

}
